package com.ymttest.database.mapping.godmember;

import com.ymttest.database.model.godmember.PointsEntry;
import com.ymttest.database.model.godmember.PointsEntryExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PointsEntryMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @SelectProvider(type=PointsEntrySqlProvider.class, method="countByExample")
    int countByExample(PointsEntryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @DeleteProvider(type=PointsEntrySqlProvider.class, method="deleteByExample")
    int deleteByExample(PointsEntryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @Delete({
        "delete from pointsentry",
        "where EntryId = #{entryId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer entryId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @Insert({
        "insert into pointsentry (EntryId, MemberId, ",
        "BizType, BizId, ",
        "BizAmount, ChangePoints, ",
        "Points, PointsTime, ",
        "Operator, Remark, ",
        "OriginNo, CreateTime, ",
        "UpdateTime)",
        "values (#{entryId,jdbcType=INTEGER}, #{memberId,jdbcType=VARCHAR}, ",
        "#{bizType,jdbcType=INTEGER}, #{bizId,jdbcType=VARCHAR}, ",
        "#{bizAmount,jdbcType=DECIMAL}, #{changePoints,jdbcType=INTEGER}, ",
        "#{points,jdbcType=INTEGER}, #{pointsTime,jdbcType=TIMESTAMP}, ",
        "#{operator,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, ",
        "#{originNo,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(PointsEntry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @InsertProvider(type=PointsEntrySqlProvider.class, method="insertSelective")
    int insertSelective(PointsEntry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @SelectProvider(type=PointsEntrySqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="EntryId", property="entryId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="MemberId", property="memberId", jdbcType=JdbcType.VARCHAR),
        @Result(column="BizType", property="bizType", jdbcType=JdbcType.INTEGER),
        @Result(column="BizId", property="bizId", jdbcType=JdbcType.VARCHAR),
        @Result(column="BizAmount", property="bizAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ChangePoints", property="changePoints", jdbcType=JdbcType.INTEGER),
        @Result(column="Points", property="points", jdbcType=JdbcType.INTEGER),
        @Result(column="PointsTime", property="pointsTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Operator", property="operator", jdbcType=JdbcType.VARCHAR),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="OriginNo", property="originNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<PointsEntry> selectByExample(PointsEntryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @Select({
        "select",
        "EntryId, MemberId, BizType, BizId, BizAmount, ChangePoints, Points, PointsTime, ",
        "Operator, Remark, OriginNo, CreateTime, UpdateTime",
        "from pointsentry",
        "where EntryId = #{entryId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="EntryId", property="entryId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="MemberId", property="memberId", jdbcType=JdbcType.VARCHAR),
        @Result(column="BizType", property="bizType", jdbcType=JdbcType.INTEGER),
        @Result(column="BizId", property="bizId", jdbcType=JdbcType.VARCHAR),
        @Result(column="BizAmount", property="bizAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ChangePoints", property="changePoints", jdbcType=JdbcType.INTEGER),
        @Result(column="Points", property="points", jdbcType=JdbcType.INTEGER),
        @Result(column="PointsTime", property="pointsTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="Operator", property="operator", jdbcType=JdbcType.VARCHAR),
        @Result(column="Remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="OriginNo", property="originNo", jdbcType=JdbcType.VARCHAR),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    PointsEntry selectByPrimaryKey(Integer entryId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @UpdateProvider(type=PointsEntrySqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PointsEntry record, @Param("example") PointsEntryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @UpdateProvider(type=PointsEntrySqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PointsEntry record, @Param("example") PointsEntryExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @UpdateProvider(type=PointsEntrySqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PointsEntry record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table pointsentry
     *
     * @mbggenerated Tue May 19 11:10:41 CST 2020
     */
    @Update({
        "update pointsentry",
        "set MemberId = #{memberId,jdbcType=VARCHAR},",
          "BizType = #{bizType,jdbcType=INTEGER},",
          "BizId = #{bizId,jdbcType=VARCHAR},",
          "BizAmount = #{bizAmount,jdbcType=DECIMAL},",
          "ChangePoints = #{changePoints,jdbcType=INTEGER},",
          "Points = #{points,jdbcType=INTEGER},",
          "PointsTime = #{pointsTime,jdbcType=TIMESTAMP},",
          "Operator = #{operator,jdbcType=VARCHAR},",
          "Remark = #{remark,jdbcType=VARCHAR},",
          "OriginNo = #{originNo,jdbcType=VARCHAR},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where EntryId = #{entryId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PointsEntry record);
}